import React, { useEffect, useRef, useState, forwardRef } from 'react';

class ChildRef extends React.Component {
    state = {
        name: ''
    }
    componentDidMount() {
        // this.props.onCreate(this)
    }

    checkLog() {
        // this.setState({
        //     name: 'xiaopa'
        // }, () => {
        //     console.log('子组件', this.props.refTest)
        // })
        console.log('子组件', this.props.refTest)
    }

    render() {
        return (
            <h3>子组件{this.state.name}</h3>
        )
    }
}

export default ChildRef;